<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: dell
  Date: 2018/10/18
  Time: 11:37
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<html>
<head>
    <link rel="stylesheet" href="../bootstrap/css/bootstrap.css">
    <script src="../js/jquery-2.2.4.min.js"></script>
    <script src="../bootstrap/js/bootstrap.js"></script>
    <c:set var="root" value="${pageContext.request.contextPath}"/>
    <title>修改页面</title>
</head>
<body>
<h3>修改商品</h3>
<div class="container">
    <div class="row clearfix">
        <div class="col-md-4 column">
        </div>
        <div class="col-md-4 column">
            <form role="form" action="${root}/editServlet" method="post">
                <input type="hidden" value="${p.pid}" name="pid">
                <div class="form-group">
                    <label for="pname">商品名称</label>
                    <input type="text" class="form-control" id="pname" name="pname" value="${p.pname}"/>
                </div>
                <div class="form-group">
                    <label for="pmarckprice">商场价格</label>
                    <input type="text" class="form-control" id="pmarckprice" name="market_price" value="${p["market_price"]}"/>
                </div>

                <div class="form-group">
                    <label for="pshopprice">商场价格</label>
                    <input type="text" class="form-control" id="pshopprice" name="shop_price" value="${p["shop_price"]}"/>
                </div>
                <div class="form-group">
                    <label for="pdesp">商品描述</label>
                    <input type="text" class="form-control" id="pdesp" name="pdesc"/>
                </div>

                <div class="form-group">
                    <label for="pishot">是否热销</label>
                    <%--假如is_hot == 0  ==1 是--%>
                    <select id="pishot" name="is_hot">
                        <c:choose>
                            <c:when test="${p['is_hot'] == 0}">
                                <option value="0" selected>否</option>
                                <option value="1">是</option>
                            </c:when>
                            <c:otherwise>
                                <option value="0" >否</option>
                                <option value="1" selected>是</option>
                            </c:otherwise>
                        </c:choose>
                    </select>
                </div>

                <input type="submit" class="btn btn-default" value="提交"></input>
            </form>
        </div>
        <div class="col-md-4 column">
        </div>
    </div>
</div>
</body>
</html>